Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-2.8.x] Ruler: protect overrides map with mutex when accessing tenant configs #11602

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

grafanabot
Copy link
Collaborator

Backport cd3cf62 from #11601


What this PR does / why we need it:
A ruler handling many hundreds of rules can provoke a situation where the WAL appender reads & modifies tenant configs concurrently in an unsafe way; this PR protects that with a mutex.

Which issue(s) this PR fixes:
Fixes #11569

Special notes for your reviewer:
This doesn't need to be locked in a fine-grained way because this isn't on the hot path.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

…#11601)

**What this PR does / why we need it**:
A ruler handling many hundreds of rules can provoke a situation where
the WAL appender reads & modifies tenant configs concurrently in an
unsafe way; this PR protects that with a mutex.

**Which issue(s) this PR fixes**:
Fixes #11569

(cherry picked from commit cd3cf62)
@grafanabot grafanabot requested a review from a team as a code owner January 8, 2024 09:25
@grafanabot grafanabot added backport size/M type/bug Somehing is not working as expected labels Jan 8, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 8, 2024
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@pull-request-size pull-request-size bot added size/M and removed size/L labels Jan 8, 2024
@dannykopping dannykopping merged commit 815e0f5 into release-2.8.x Jan 8, 2024
4 checks passed
@dannykopping dannykopping deleted the backport-11601-to-release-2.8.x branch January 8, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport size/M type/bug Somehing is not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants